home *** CD-ROM | disk | FTP | other *** search
- /* delpicture.frx
- * Removes a picture entry from Fiasco's picture database
- * Copyright © 1996-1997 Nils Bandener
- * $VER: delpicture 6.2 (6.10.97)
- */
-
- Options Results
- Options FailAt 21
- Parse Arg num
-
- scriptname = "DelPicture"
-
- fiasco_port = address()
-
- Signal on Syntax
- Signal on Halt
- Signal on Break_C
- Signal on Failure
-
- LockGUI
-
- GetField "Name_" || num
- name = result
-
- if length(name) > 0 then
- do
-
- GetField "DT_" || num
- thumbnail = result
-
- SetField 'DT_' || num '""'
-
- SetField 'Name_' || num '""'
-
- Address Command "Delete" thumbnail "Quiet"
-
- GetField "Cnt"
- SetField "Cnt" result - 1
- end
-
- bail_out:
-
- Address Value fiasco_port
-
- UnlockGUI
-
- exit
-
- syntax:
- failure:
-
- if show("Ports", fiasco_port) then
- do
- Interpret Address fiasco_port
-
- RequestChoice '"Error ' || rc || ' in line ' || sigl || ':*n' || errortext(rc) || '" "Cancel" Title "' || scriptname || '"'
- end
- else
- do
- say "Error" rc "in line" sigl ":" errortext(rc)
- say "Enter to continue"
- pull dummy
- end
-
- call bail_out
-
- halt:
- break_c:
-
- if show("Ports", fiasco_port) then
- do
- Address Value fiasco_port
-
- RequestChoice '"Script Abort Requested" "Abort Script" Title "' || scriptname || '"'
- end
- else
- do
- say "*** Break"
- say "Enter to continue"
- pull dummy
- end
-
- call bail_out
-
-
-